/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.payment;

import com.enation.app.javashop.client.payment.PaymentBillClient;
import com.enation.app.javashop.core.client.fallback.payment.PaymentBillClientFeignFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.payment.dos.PaymentBillDO;
import com.enation.app.javashop.model.payment.vo.PayBill;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author kingapex
 * @version 1.0
 * @since 7.1.0
 * 2020/4/16
 */

@FeignClient(name = "payment-service", fallbackFactory = PaymentBillClientFeignFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface PaymentBillClientFeignImpl extends PaymentBillClient {

    @Override
    @RequestMapping(value = "/client/payment/bill", method = RequestMethod.POST)
    PayBill add(@RequestBody PaymentBillDO paymentBill);


    @Override
    @RequestMapping(value = "/client/payment/bill/{bill_id}", method = RequestMethod.DELETE)
    void deletePaymentBill(@PathVariable("bill_id") Long billId);

    @Override
    @RequestMapping(value = "/client/payment/bill/close-trade", method = RequestMethod.POST)
    void closeTrade(@RequestBody PaymentBillDO paymentBillDO);

    @Override
    @RequestMapping(value = "/client/payment/bill/send-message", method = RequestMethod.POST)
    void sendCloseTradeMessage(@RequestParam Map<String, Object> map);
}
